	window.onload=function()
	{
	 var date_select_btn=document.getElementById("date_select_btn");
	 var date_select_page=document.getElementById("date_select_page");
	 var select_page=document.getElementById("select_page");
	 var date_select_ul=document.getElementById("date_select_ul");
	 date_select_btn.onclick=function(e)
	 {
		date_select_page.style.display="block";
		var old_date_field=document.querySelector("span[dbfield='date']").innerHTML;
		var date_select_page_selected_lis=date_select_page.querySelectorAll("li");
		for(var i=0,len=date_select_page_selected_lis.length;i<len;i++){
			var li_span_text=date_select_page_selected_lis[i].querySelector("span").innerHTML;
			if(old_date_field==li_span_text){
				date_select_page_selected_lis[i].className="date_selected_li";
				date_select_page_selected_lis[i].querySelectorAll("span")[1].style.display="block";
			}else{
				date_select_page_selected_lis[i].className="";
				date_select_page_selected_lis[i].querySelectorAll("span")[1].style.display="none";
			}
		}
		document.getElementById("date_select_page_center_content").style.height=len>110?195+"px":(40*len)+"px";
		e.stopPropagation();
	 }
	 
	 select_page.onclick=function(e){
		 date_select_page.style.display="none";
	 }
	 
	 date_select_ul.onmouseup=function(e){
		 	var text=e.target.querySelector("span").innerHTML;
			var date_field=document.querySelector("span[dbfield='date']");
			date_field.innerHTML=text;
	 }
	 
	}